<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>360photo</title>
    <style>
        .box{
            perspective: 2000px;
            transform:rotateX(-20deg);    
        }
        @keyframes a{
            100%{
                transform: translateZ(100px) rotateX(-20deg) rotateY(360deg);
            }
        }
        #wrapper{
            width: 200px;
            height: 200px;
            transform-style: preserve-3d;
            margin: 200px auto;
            position: relative;
            transform: translateZ(100px) rotateX(-20deg) rotateY(0deg);
        }
        #wrapper div{
            width: 200px;
            height: 200px;
            position: absolute;
            border: 1px solid #000;
            overflow: hidden;
            -webkit-box-reflect: below;
        }
       /* #wrapper div:nth-of-type(1){
            background: url(img/pic1.jpg);
            transform: rotateY(0deg) translateZ(300px) ;
        }
        #wrapper div:nth-of-type(2){
            background: url(img/pic2.jpg);
            transform: rotateY(60deg)  translateZ(300px);
        }
        #wrapper div:nth-of-type(3){
            background: url(img/pic3.jpg);
            transform: rotateY(120deg) translateZ(300px) ;
        }
        #wrapper div:nth-of-type(4){
            background: url(img/pic4.jpg);
            transform: rotateY(180deg) translateZ(300px) ;
        }
        #wrapper div:nth-of-type(5){
            background: url(img/pic5.jpg);
            transform: rotateY(240deg) translateZ(300px) ;
        }
        #wrapper div:nth-of-type(6){
            background: url(img/pic6.jpg);
            transform: rotateY(300deg) translateZ(300px) ;
        }*/
    </style>
</head>
<body>
   <div class="box">
        <div id='wrapper'>
            <div></div>
            <div></div>
            <div></div>
            <div></div>
            <div></div>
            <div></div>
            <div></div>
            <div></div>
            <div></div>
            <div></div>
            <div></div>
            <div></div>
        </div>
   </div>
    <script>
        var wrapper = document.getElementById('wrapper');
        wrapper.style.animation = 'a 10s linear infinite'; 
        var divs = wrapper.getElementsByTagName('div');
        for(var i = 0, max= divs.length;i<max;i++){
            divs[i].style.transform = 'rotateY('+(360/max)*(i)+'deg) translateZ(400px)';
            divs[i].style.background = 'url(img/pic'+((i%6)+1)+'.jpg)';
        }
    </script>
</body>
</html>